package com.mini.mysql.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
* @author Zheng Jie
* @date 2019-03-25
*/
@Entity
@Data
@ApiModel("部门基础数据")
public class Dept implements Serializable {

    /**
     * ID
     */
    @Id
    private Long id;

    /**
     * 名称
     */
    private String name;

    @NotNull
    private Boolean enabled;

    /**
     * 上级部门
     */
    private Long pid;

    private Timestamp createTime;

    private String remark;

    private Integer level;

    private Integer rlevel;

    private String kdId;

    private String aliasName;

    /**
     * 1-自建，2-钉钉
     */
    private Integer source;

    /**
     * 0-未确认，1-已确认
     */
    private Integer confirm;


    public String getLabel() {
        return name;
    }
}